<?php
	/*
		Simple settings switcher
						*/
class myswitch
{
	var $s_key;
	var $db;
	
	function myswitch($skey,$db){
	$this->s_key = $skey;
	$this->db = $db;
	}
 
function set_key_value($value){
$this->db->Exec("delete from settings where s_key='".$this->s_key."'");
$this->db->Exec("insert into settings (s_key,s_value) values('".$this->s_key."','".$value."')");

}

function get_key_value(){
    $r = $this->db->getone("select s_value from settings where s_key = '".$this->s_key."'");
    return $r;
}

}
?>